import request from '@/utils/request'
// -------- 合同类型 --------

let BASE_ADDRESS = 'base/contractType'
let BASE_LIST='doc/scontract'

//  分页查询
export function getContractTypeListApi(params) {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}
//类别编辑
export function editContractTypeListApi(data) {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data,
        
    })
}
//类别新增
export function addContractTypeListApi(data) {
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data,
        
    })
}
//合同名称查询
export function getscontractListApi(params) {
    return request({
        url: `${BASE_LIST}/list`,
        method: "get",
        params,
        
    })
}
//合同内容id查询
export function getscontractgetInfoApi(params) {
    return request({
        url: `${BASE_LIST}/getInfo?id=${params}`,
        method: "get",
    })
}
 //合同内容的编辑
 export function editscontractinfoApi(data) {
    return request({
        url: `${BASE_LIST}/edit`,
        method: "put",
        data,
        
    })
}
 //合同内容的删除
 export function deletecontractListApi(params) {
     
    return request({
        url: `${BASE_LIST}/removeItem`,
        method: "delete",
        params,
        
    })
}
 //合同内容的新增
 export function addscontractListApi(data) {
    return request({
        url: `${BASE_LIST}/add`,
        method: "post",
        data,
    })
}

//要素信息的查询
export function getfactorListApi(params) {
    return request({
        url: `base/contractVerify/list`,
        method: "get",
        params
    })
}
//要素信息的編輯
export function editfactorListApi(data) {
    return request({
        url: `/base/contractVerify/edit`,
        method: "put",
        data,
    })
}
//要素信息的新增
export function addfactorListApi(data) {
    return request({
        url: `/base/contractVerify/add`,
        method: "post",
        data,
    })
}

//要素信息的刪除
export function deletfactorListApi(data) {
    return request({
        url: `/base/contractVerify/remove`,
        method: "delete",
        data
    })
}

// 上传合同 可批量 /doc/scontract/uploadContractFiles
export function uploadContractFilesApi(data) {
    return request({
        url: `/doc/scontract/uploadContractFiles`,
        method: "post",
        data
    })
}
